﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using PBOffice.Models;
using PBOffice.BLL;

public partial class NewsManager_NewsInfo : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Request.QueryString["id"] != null)
            {
                int newsId = Convert.ToInt32(Request.QueryString["id"]);
                News ne = new NewsManager().GetNewsById(newsId);
                this.lbCommend.Text = ne.IsCommend == true ? "是" : "否";
                this.lbContent.Text = ne.NewsContent;
                this.lbId.Text = newsId.ToString();
                lbTitle.Text = ne.NewsTitle;
                lbTop.Text = ne.IsTop == true ? "是" : "否";
                lbType.Text = ne.NewsType.TypeName;
            }
        }
    }
}